Repository navigation
feat: wire boilerplate to crudauth follow-ups - #292
Conversation
Rebuild the crudauth integration on top of current main and crudauth 0.7.0: - configure the shared password policy and drive the signup schema from the same PASSWORD_* settings so both enforce the same rules; - use crudauth's built-in OAuth router (configurable paths, JSON responses, browser-bound state) instead of the hand-rolled Google routes; - apply crudauth's per-request, tier/path-aware rate limiting with a router-level dependency, replacing the in-tree middleware/provider; - inject the shared Redis clients into crudauth and the cache backend; - delete the now-dead infrastructure/rate_limit package, its tests, and the vestigial RATE_LIMITER_BACKEND / FAIL_OPEN / MEMCACHED settings; - update tests and docs.
|
Rebuilt this branch on top of current New commits:
Validation: |
1a92ec9 to
5c555da
Compare
… rate-limit budget, take the password field from the policy, and test all of it
… logins, and hash passwords off the event loop
|
fixed some things: OAuth, three problems:
Rate limiting, two problems:
A few smaller changes:
Tests: the branch had deleted the OAuth and limiter suites without adding replacements, so I added 8 OAuth tests against the app as mounted, 4 end-to-end rate-limit tests including the tier path, wiring tests, and signup and login coverage. That's 307 passing, and nine mutations of the fixes are each caught. Because pytest gives each test its own event loop and the Redis clients break across loops, the production path was also run once in a single process against real Postgres 16 and Redis 7. Login, per-path limits, the policy, and a full Google callback all behaved, and the counters landed in Redis under the per-path keys. |
Wires the boilerplate to the follow-up crudauth APIs and removes the duplicated application auth infrastructure.
Changes:
This PR must remain blocked until the following crudauth PRs are merged and released:
The dependency is set to crudauth>=0.7.0,<0.8.0 because that release is required for this branch.